<?php if(!defined('CALL')) exit('No direct script access allowed');

include_once 'lib/xtemplate.class.php';
include_once 'view/page.class.php';

class AddPage extends Page
{
	private $xtpl2 = null;
	
	public function __construct($viewer)
	{
		parent::__construct($viewer, 'page-add.js');
		$this->xtpl2 = new XTemplate(ROOT_URL.'xtpl/page_add.xtpl');
	}

	protected function fill_header($xtpl)
	{
		$this->xtpl2->parse('root.header');
		$html= $this->xtpl2->out('root.header');
		$xtpl->assign('header', $html);
		$xtpl->parse('root.header');
	}

	protected function fill_body($xtpl)
	{
		$xtpl->assign('body', 'body');
		$xtpl->parse('root.body');
	}

	protected function fill_footer($xtpl)
	{
		$xtpl->assign('footer', 'footer');
		$xtpl->parse('root.footer');
	}

	protected function add_css()
	{
		return "";
	}

	protected function add_js()
	{
		return "";
	}
}
